package experiment;

import java.util.Scanner;

public class Comparison {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        System.out.println("请输入第1个数字");
        int a = sc.nextInt();
        System.out.println("请输入第2个数字");
        int b = sc.nextInt();
        System.out.println("请输入第3个数字");
        int c = sc.nextInt();
        Mycomperison(a, b, c);
    }

    public static void Mycomperison(int a, int b, int c) {
        if (a > b) {
            if (b > c) {
                System.out.println(c + "<" + b + "<" + a);
            } else {
                //a>b,b<=c,b最小
                if (a > c) {       //b<c<a
                    System.out.println(b + "<" + c + "<" + a);
                } else {
                    //b最小，c最大
                    System.out.println(b + "<" + a + "<" + c);
                }
            }
        } else {   //a<=b的情况
            if(b<c){
                //a最小，c最大
                System.out.println(a+"<"+b+"<"+c);
            }else{
                //a<b,c<b的情况,b最大
                if(a>c){
                    System.out.println(c+"<"+a+"<"+b);
                }else{
                    System.out.println(a+"<"+c+"<"+b);
                }
            }
        }
    }
}
